package CurrencyConverter

import (
	"testing"
)

func TestConverter(t *testing.T) {
	choose1 := "USD"
	choose2 := "EUR"
	amount := 5.0
	result, err := Convert(choose1, choose2, amount)
	if err != nil {
		t.Fatalf("Conversion failed: %v", err)
	}

	// You can adjust this expected value based on known rates or use a range for acceptable results
	expected := 4.5 // This is an example, adjust based on current rates
	if result < expected*0.95 || result > expected*1.05 {
		t.Errorf("Conversion result is out of expected range: got %f, expected around %f", result, expected)
	}
	t.Logf("Conversion result: %f", result)
}
